#pragma once
#include "Headers.h"

namespace CinePerfil 
{
	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	public ref class Change_Password_Window : public System::Windows::Forms::Form
	{
	public:
		Change_Password_Window(Account* acc)
		{
			account = acc;
			InitializeComponent();
		}

	protected:
		~Change_Password_Window()
		{
			if (components)
			{
				delete components;
			}
		}
	private: Account* account;
	private: System::Windows::Forms::Label^  CPW_errorLabel;
	private: System::Windows::Forms::Label^  CPW_currentPasswordLabel;
	private: System::Windows::Forms::Label^  CPW_newPasswordLabel;
	private: System::Windows::Forms::Label^  CPW_confirmNewPasswordLabel;
	private: System::Windows::Forms::TextBox^  CPW_currentPasswordTextBox;
	private: System::Windows::Forms::TextBox^  CPW_newPasswordTextBox;
	private: System::Windows::Forms::TextBox^  CPW_confirmNewPasswordTextBox;
	private: System::Windows::Forms::Button^  CPW_okButton;
	private: System::Windows::Forms::Button^  CPW_cancelButton;
	private: System::Windows::Forms::Label^  CPW_titleLabel;
	private: System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code

		void InitializeComponent(void)
		{
			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(Change_Password_Window::typeid));
			this->CPW_errorLabel = (gcnew System::Windows::Forms::Label());
			this->CPW_currentPasswordLabel = (gcnew System::Windows::Forms::Label());
			this->CPW_newPasswordLabel = (gcnew System::Windows::Forms::Label());
			this->CPW_confirmNewPasswordLabel = (gcnew System::Windows::Forms::Label());
			this->CPW_currentPasswordTextBox = (gcnew System::Windows::Forms::TextBox());
			this->CPW_newPasswordTextBox = (gcnew System::Windows::Forms::TextBox());
			this->CPW_confirmNewPasswordTextBox = (gcnew System::Windows::Forms::TextBox());
			this->CPW_okButton = (gcnew System::Windows::Forms::Button());
			this->CPW_cancelButton = (gcnew System::Windows::Forms::Button());
			this->CPW_titleLabel = (gcnew System::Windows::Forms::Label());
			this->SuspendLayout();
			// 
			// CPW_errorLabel
			// 
			this->CPW_errorLabel->BackColor = System::Drawing::Color::Transparent;
			this->CPW_errorLabel->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 9, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->CPW_errorLabel->ForeColor = System::Drawing::Color::Red;
			this->CPW_errorLabel->Location = System::Drawing::Point(75, 220);
			this->CPW_errorLabel->Name = L"CPW_errorLabel";
			this->CPW_errorLabel->Size = System::Drawing::Size(500, 13);
			this->CPW_errorLabel->TabIndex = 4;
			this->CPW_errorLabel->TextAlign = System::Drawing::ContentAlignment::MiddleCenter;
			// 
			// CPW_currentPasswordLabel
			// 
			this->CPW_currentPasswordLabel->AutoSize = true;
			this->CPW_currentPasswordLabel->BackColor = System::Drawing::Color::Transparent;
			this->CPW_currentPasswordLabel->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->CPW_currentPasswordLabel->Location = System::Drawing::Point(165, 80);
			this->CPW_currentPasswordLabel->Name = L"CPW_currentPasswordLabel";
			this->CPW_currentPasswordLabel->Size = System::Drawing::Size(136, 20);
			this->CPW_currentPasswordLabel->TabIndex = 5;
			this->CPW_currentPasswordLabel->Text = L"Current Password:";
			// 
			// CPW_newPasswordLabel
			// 
			this->CPW_newPasswordLabel->AutoSize = true;
			this->CPW_newPasswordLabel->BackColor = System::Drawing::Color::Transparent;
			this->CPW_newPasswordLabel->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->CPW_newPasswordLabel->Location = System::Drawing::Point(188, 126);
			this->CPW_newPasswordLabel->Name = L"CPW_newPasswordLabel";
			this->CPW_newPasswordLabel->Size = System::Drawing::Size(113, 20);
			this->CPW_newPasswordLabel->TabIndex = 6;
			this->CPW_newPasswordLabel->Text = L"New Password:";
			// 
			// CPW_confirmNewPasswordLabel
			// 
			this->CPW_confirmNewPasswordLabel->AutoSize = true;
			this->CPW_confirmNewPasswordLabel->BackColor = System::Drawing::Color::Transparent;
			this->CPW_confirmNewPasswordLabel->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->CPW_confirmNewPasswordLabel->Location = System::Drawing::Point(129, 166);
			this->CPW_confirmNewPasswordLabel->Name = L"CPW_confirmNewPasswordLabel";
			this->CPW_confirmNewPasswordLabel->Size = System::Drawing::Size(172, 20);
			this->CPW_confirmNewPasswordLabel->TabIndex = 7;
			this->CPW_confirmNewPasswordLabel->Text = L"Confirm New Password:";
			// 
			// CPW_currentPasswordTextBox
			// 
			this->CPW_currentPasswordTextBox->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->CPW_currentPasswordTextBox->Location = System::Drawing::Point(305, 77);
			this->CPW_currentPasswordTextBox->Name = L"CPW_currentPasswordTextBox";
			this->CPW_currentPasswordTextBox->PasswordChar = '*';
			this->CPW_currentPasswordTextBox->Size = System::Drawing::Size(150, 28);
			this->CPW_currentPasswordTextBox->TabIndex = 8;
			// 
			// CPW_newPasswordTextBox
			// 
			this->CPW_newPasswordTextBox->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->CPW_newPasswordTextBox->Location = System::Drawing::Point(305, 123);
			this->CPW_newPasswordTextBox->Name = L"CPW_newPasswordTextBox";
			this->CPW_newPasswordTextBox->PasswordChar = '*';
			this->CPW_newPasswordTextBox->Size = System::Drawing::Size(150, 28);
			this->CPW_newPasswordTextBox->TabIndex = 9;
			// 
			// CPW_confirmNewPasswordTextBox
			// 
			this->CPW_confirmNewPasswordTextBox->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->CPW_confirmNewPasswordTextBox->Location = System::Drawing::Point(305, 163);
			this->CPW_confirmNewPasswordTextBox->Name = L"CPW_confirmNewPasswordTextBox";
			this->CPW_confirmNewPasswordTextBox->PasswordChar = '*';
			this->CPW_confirmNewPasswordTextBox->Size = System::Drawing::Size(150, 28);
			this->CPW_confirmNewPasswordTextBox->TabIndex = 10;
			// 
			// CPW_okButton
			// 
			this->CPW_okButton->Cursor = System::Windows::Forms::Cursors::Hand;
			this->CPW_okButton->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->CPW_okButton->Location = System::Drawing::Point(122, 250);
			this->CPW_okButton->Name = L"CPW_okButton";
			this->CPW_okButton->Size = System::Drawing::Size(150, 65);
			this->CPW_okButton->TabIndex = 11;
			this->CPW_okButton->Text = L"Ok";
			this->CPW_okButton->UseVisualStyleBackColor = true;
			this->CPW_okButton->Click += gcnew System::EventHandler(this, &Change_Password_Window::CPW_okButton_Click);
			// 
			// CPW_cancelButton
			// 
			this->CPW_cancelButton->Cursor = System::Windows::Forms::Cursors::Hand;
			this->CPW_cancelButton->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->CPW_cancelButton->Location = System::Drawing::Point(362, 250);
			this->CPW_cancelButton->Name = L"CPW_cancelButton";
			this->CPW_cancelButton->Size = System::Drawing::Size(150, 65);
			this->CPW_cancelButton->TabIndex = 12;
			this->CPW_cancelButton->Text = L"Cancel";
			this->CPW_cancelButton->UseVisualStyleBackColor = true;
			this->CPW_cancelButton->Click += gcnew System::EventHandler(this, &Change_Password_Window::CPW_cancelButton_Click);
			// 
			// CPW_titleLabel
			// 
			this->CPW_titleLabel->AutoSize = true;
			this->CPW_titleLabel->BackColor = System::Drawing::Color::Transparent;
			this->CPW_titleLabel->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->CPW_titleLabel->Location = System::Drawing::Point(30, 20);
			this->CPW_titleLabel->Name = L"CPW_titleLabel";
			this->CPW_titleLabel->Size = System::Drawing::Size(235, 23);
			this->CPW_titleLabel->TabIndex = 13;
			this->CPW_titleLabel->Text = L"Change your account password:";
			// 
			// Change_Password_Window
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->BackgroundImage = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"$this.BackgroundImage")));
			this->ClientSize = System::Drawing::Size(634, 336);
			this->ControlBox = false;
			this->Controls->Add(this->CPW_titleLabel);
			this->Controls->Add(this->CPW_cancelButton);
			this->Controls->Add(this->CPW_okButton);
			this->Controls->Add(this->CPW_confirmNewPasswordTextBox);
			this->Controls->Add(this->CPW_newPasswordTextBox);
			this->Controls->Add(this->CPW_currentPasswordTextBox);
			this->Controls->Add(this->CPW_confirmNewPasswordLabel);
			this->Controls->Add(this->CPW_newPasswordLabel);
			this->Controls->Add(this->CPW_currentPasswordLabel);
			this->Controls->Add(this->CPW_errorLabel);
			this->MaximumSize = System::Drawing::Size(650, 375);
			this->MinimumSize = System::Drawing::Size(650, 375);
			this->Name = L"Change_Password_Window";
			this->SizeGripStyle = System::Windows::Forms::SizeGripStyle::Hide;
			this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
			this->Text = L"CinePerfil - Change Account Password";
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
	private: 
		System::Void CPW_okButton_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void CPW_cancelButton_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void clear_textboxes(Boolean all);
	};
}
